home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amigabasic / wartrans.lha / bin->hex next >
Text File  |  1998-02-27  |  356b  |  19 lines

  1. INPUT "Enter FileName to Convert: ",OldFile$
  2. OPEN OldFile$ FOR INPUT AS #1
  3. INPUT "Enter Filname to Create: ",NewFile$
  4. OPEN NewFile$ FOR OUTPUT AS #2 
  5. EntireFile$ = INPUT$(LOF(1),#1)
  6.  
  7. FOR I = 1 TO LOF(1)
  8.  
  9. A$ = HEX$(ASC(RIGHT$(LEFT$(EntireFile$,I),1)))
  10. IF LEN(A$) = 1 THEN
  11.    B$ = "0" 
  12.    PRINT #2,B$;A$;
  13. ELSE
  14.    PRINT #2,A$;
  15. END IF
  16. NEXT I
  17. CLOSE #1
  18. CLOSE #2
  19.